import request from '@/utils/request.js'

// table列表
export const transitionList = (data) => {
    return request({
        url: '/transition/list',
        method: 'get',
        params: data
    })
}

// 新增转写
export const newTransition = (data) => {
    return request({
        url: '/transition',
        method: 'post',
        data: data
    })
}

// 模版select
export const templateList = (id) => {
    return request({
        url: '/template/list/' + id,
        method: 'get'
    })
}

// 转写详情
export const detailTransition = (data) => {
    return request({
        url: '/transition/getInfo',
        method: 'post',
        data
    })
}

// 修改转写
export const editTransition = (data) => {
    return request({
        url: '/transition',
        method: 'put',
        data: data
    })
}

// 转写删除
export const transitionRowDel = (id) => {
    return request({
        url: `/transition/${id}`,
        method: 'delete'
    })
}

// 转写批量删除
export const transitionsDel = (ids) => {
    return request({
        url: `/transition/batchDelete`,
        method: 'delete',
        data: ids
    })
}

// 转写批量导出
export const transitionExport = (data) => {
    return request({
        url: `/transition/export`,
        method: 'post',
        data: data,
        responseType: 'blob'//处理乱码问题，转化为blob类型
    })
}// 转写批量导出
export const transitionReload = (data) => {
    return request({
        url: `transition/reload`,
        method: 'post',
        data: data,
        responseType: 'blob'//处理乱码问题，转化为blob类型
    })
}
